[XML-SIG] repost: getElementsByTagName interpretation

Mike Olson Mike.Olson@fourthought.com
Fri, 23 Jun 2000 11:29:29 -0600

Martijn Faassen wrote:
> [I tried posting this message yesterday but somehow it didn't appear on
> the list -- did anyone receive it? Here I'll try again.]
> Hi there,
> Is there any official Python DOM policy on implementing getElementsByTagName()?
> According to the official DOM spec (and the level 2 proposed recommendation),
> getElementsByTagName() is supposed to return a live NodeList.
> Studying the 4DOM however, it looks like the NodeList returned by
> getElementsByTagName is *not* live.

Hi Martijn,

  We are compliant in some cases, but not all.  We should probably
document this better.  Ex, we are compliant with childNodes, but not
getElementsByTagName.  To implement this on getElementsByTagName we are
waiting until we have DOM Level II Events.  This should make the task

> Looking at the archives I can only find a message by Andrew Kuchling in
> october '98 complaining about the DOM spec in this regard. I hearthily
> agree with him. Has since then any decision been reached on how to
> approach this in Python DOMs? I'd like to know what I ought to do.

I don't think there is a concensus, or even a question outstanding.  The
focus of 4DOM is to implement the spec as pythonic as possible.  Other
implementations, qp_xml, minidom, pulldom take more liberties.

> On the one hand I desperately want to implement the simple non-live behavior,
> as doing the other is a major pain. On the other hand, I'd risk introducing
> an incompatibility with other DOMs.

The non living behaviour is pretty simple.  Your right, it is a major
pain to implement all node lists as live....It comes down to a trade


> Regards,
> Martijn
> _______________________________________________
> 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