[XML-SIG] Re: python SAX API

Lars Marius Garshol larsga@garshol.priv.no
16 Nov 2001 16:52:58 +0100


* Alexandre Fayolle
|
| I'm fully aware that noone's going to dump xml.sax just because I
| express some concerns about it. It's too late, and if I'm the only
| one expressing concerns, the problem is probably on my side. I'll
| nevertheless express these concerns, because I usually feel better
| afterwards. ;o)

It's always good to have such concerns out in the open, both for your
sake and for all the rest of us. If there's anything that irritates me
it's people who are displeased and keep shut about it.
 
* Lars Marius Garshol
|
| Well, I haven't had this experience. I was part of the Java SAX design
| process, and have used Java SAX for years now. I have no problems
| switching back and forth between the two. 
 
* Alexandre Fayolle
|
| Well obviously, since you were part of the design process of both ;o)

True, but what I meant was that it shows that if you come to this with
the attitude that they are different there is no problem.
 
* Lars Marius Garshol
|
| I think the problem here is your expectation that the two should be
| the same, not the design of Python SAX. And given the lack of Python
| SAX documentation I think your expectation is to some extent
| inevitable.
 
* Alexandre Fayolle
|
| My general expectation is least surprise. 

We're going into hermeneutical territory here. You're surprised
because you started with the wrong expectations. You should never have
had those expectations, but you did, and nobody told you you were
wrong. I think some people are going to come at this the same way, so
we need to tell them they are wrong, before they get too frustrated.

| Since SAX defines interfaces and since it is fairly easy to
| translate the java interfaces of the reference implementation into
| python, I'd expect the python version of these interface to be close
| to the original. 

It could have been, but it wouldn't have been very nice to use.
Representing namespace names as (nsuri, lname), for example, makes
things a lot easier, but to do that you have to change the APIs quite
fundamentally.
 
| It's the same for DOM, really. I expect a python DOM implementation
| to be as close as possible to what is defined by the IDL description
| of the interfaces. 

Well, the DOM is different. It has an IDL definition. SAX doesn't, and
things like InputSource are very Java-centric.

| The main thing is: I want to learn the API once and be able to use
| it naturally in all the languages I'm familiar with, after reading
| at most half a page of documentation explaining the changes from the
| original API.  

We can still do that.

| Now, that's it, I've finished ranting. I perfectly understand your
| point of view, and I hope you understand my point. I'm not the boss
| here, and I'll follow whatever decision has been taken before I
| arrived.

I like to think that we have no boss here, but other than that my only
comment to this paragraph is: good.
 
| I'll move on to productive suggestions, now that this has been
| sorted out.

Excellent!

--Lars M.