[XML-SIG] Reconsidering the DOM API

Mike Olson Mike.Olson@fourthought.com
Wed, 28 Jun 2000 12:08:07 -0600

Paul Prescod wrote:
> Walter Doerwald wrote:
> >
> > Why not put children and attribute access into __getitem__
> >          c = b[0][1][0]["abc"]
> Not a bad idea as syntactic sugar. We should consider it for the NEXT
> version of the DOM API mapping.

I like it for syntatic sugar as well, but namespaces would make the
attribute access interesting

c = b[("http://www.fourthought.com","abc")]


c = b["http://wwwifourthought.com:abc"]

Also, for childNode access would we do anything about node types?  is
b[0] the first child, first element, first elment with a certain
tagname?  All I see as useful.


> --
>  Paul Prescod - Not encumbered by corporate consensus
> The calculus and the rich body of mathematical analysis to which it
> gave rise made modern science possible, but it was the algorithm that
> made the modern world possible.
>         - The Advent of the Algorithm (pending), by David Berlinski
> _______________________________________________
> XML-SIG maillist  -  XML-SIG@python.org
> http://www.python.org/mailman/listinfo/xml-sig

Mike Olson				 Principal Consultant
mike.olson@fourthought.com               (303)583-9900 x 102
Fourthought, Inc.                         http://Fourthought.com 
Software-engineering, knowledge-management, XML, CORBA, Linux, Python