[XML-SIG] SAX Namespaces

Paul Prescod paul@prescod.net
Thu, 06 Jul 2000 16:42:13 -0500


"Fred L. Drake, Jr." wrote:
> 
> ...
> 
>   The unexpected part was that you'd *ever* want to iterate over a
> list in "normal" applications!  

What's normal? There is a lot of code out there that is unconcerned with
a particular vocabulary.

> Unless the order of the attributes in
> the source instance is important, I don't see why.

It isn't at the top of my list, but maintaining attribute order is nice.
Think about "diff". and other line-oriented applications like "grep".

>   Ok:
> 
>         SAX     -- efficient version is sufficient
>         DOM     -- all my DOM code requests attributes by name, so
>                    lookup approach works; can be copied to a list on
>                    demand, or the efficient C AttributeList can
>                    provide this internally
>         Pyxie   -- not sure
>         QP_xml  -- exposes a dictionary interface, so something
>                    dict-like should work nicely as long as the
>                    interface & efficiency are right.

Okay, you are presuming that this object would be used by all APIs. I
was presuming that each API sets up its own data structures. A shared
structure can only work if the APIs all expose the same interface or if
the APIs that wanted non-standard access "wrapped" the standard object.
This would not be too bad if the "standard object" is itself as
efficient as the custom-data structures would be or at least as
efficient as the list would be so that the APIs have the option of
copying data out.

>   Should I persue that possibility, or am I missing something really
> substantial somewhere?  (Probably several things, but... related to
> this?)

No, if you have time to work on it and can work out an API and
implementation that performs roughly comparably to built-in Python data
structures, I would buy it. But we're a little short of time!

-- 
 Paul Prescod - Not encumbered by corporate consensus
The distinction between the real twentieth century (1914-1999) and the
calenderical one (1900-2000) is based on the convincing idea that the 
century's bouts of unprecented violence, both within nations and between 
them, possess a definite historical coherence -- that they constitute,
to 
put it simply, a single story. 
	- The Unfinished Twentieth Century, Jonathan Schell 
		Harper's Magazine, January 2000