[XML-SIG] foo.bar vs. foo.get_bar()
uche.ogbuji@fourthought.com
uche.ogbuji@fourthought.com
Fri, 05 Nov 1999 16:51:19 -0700
> > The real mess comes about if MyNode's programmer wants to use __[g/s]etattr__
> > for whatever reason.
>
> Presuming your DOM uses those already.
>
> > So the list of knocks against "node.parent" is now:
> >
> > * Probably slower
> > * Complex behavior masked in a supposedly simple attribute access
> > * Possible confusion and complexity in sub-classing situations
>
> IFF __getattr__ is used. If the attribute actually exists, then this is
> the fastest approach possible. This is why qp_xml is so quick -- it has
> all the attributes already assigned and clients just grab the values.
Yes, but a large part of the DOM REC can't be followed using pure attributes
without __[g/s]etattr__. I know that one can choose to implement subsets and
approximations to the W3C DOM that don't run into such problems, but that
doesn't suit everyone's needs. Some of us are looking for full DOM
compliance, and that's why we're dealing with these issues.
--
Uche Ogbuji
FourThought LLC, IT Consultants
uche.ogbuji@fourthought.com (970)481-0805
Software engineering, project management, Intranets and Extranets
http://FourThought.com http://OpenTechnology.org