[XML-SIG] Documenting DOM bugs
uche.ogbuji at fourthought.com
Fri Jun 13 12:36:01 EDT 2003
> For this reason I've compiled a table of support and bugs for DOM Level 2
> Core/XML features that a typical DOM application might want to use. I've
> tested the minidoms supplied with common Python versions and PyXML packages,
> along with PyXML 4DOMs and - somewhat less thoroughly - the 4Suite Domlettes.
> I believe it would be helpful to put this sort of thing (with updates)
> somewhere fairly visible, to stop authors getting confused when their DOM
> applications don't work.
Holy cow! This, my friend, is an extraordinary feat and a true mitzvah.
Thanks a million.
Do you have a moment to comment on your testing mthodology, and perhaps even
to ost the scripts you used? It feels as if you have a lot more goodies than
just this comprehnsive table.
> h. prefix is guessed from namespaceURI, not necessarily original prefix
> (consequence of using pyexpat with namespace processing on)
Yes. this is a tough one. In cDomlette we decided to manage the namespace
decls urselves, just to avoid losing information, but it is a very tedious
chore, and I'm not sure I'd wish it on any pyexpat developer.
> k. always an empty list
Yes. This is a consequence of the fact that when the DOM and XPath models
clash, we plump for XPth. The primary purpose of the Domlettes is to be as
complete and efficient as we can for XPath while maintaining as much of the
feel of DOM as we can. The problem here is that attribute nodes don't have
children in the XPath data model.
> l. Only read access works. In 4Suite 0.11.1's cDomlette the childNodes are
> at least readonly; in other DOMs changing the children puts the DOM into
> an inconsistent state.
This sounds like a current bug. Could you check a repro case into the tracker?
> m. only provided when running under Python 2.2 or later
> p. Returns a node with localName set to its nodeName - localName should be
> t. Default namespace declarations are indexed as having a localName of
> ''/None even though their localName is, correctly, 'xmlns'. Because
> None cannot be passed as a localName in cDomlette 1.0a1, default namespace
> declarations become inaccessible.
Thnaks. I'll try to track this one down.
> u. NodeLists returned by getElementsByTagName[NS] are not 'live'
> (xml.dom.minidom.NodeList etc.)
I don't expect us to ever have live return from getElementsByTagName or the
NodeIterator interfaces. I've agued ont he www-dom list that t's too much to
ask a non-browser DOM impl. es, Xerces dos it with some heroic effort. I'm
not sure we'd have a victim to do so for PyXML, and even if so, I'd be worried
about its effect on performance.
Thanks again. Incredible effort.
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.net http://4Suite.org http://fourthought.com
XML Data Bindings in Python - http://www.xml.com/pub/a/2003/06/11/py-xml.html
Introducing Examplotron - http://www-106.ibm.com/developerworks/xml/library/x-xmptron/
Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.html
The commons of creativity - http://www-106.ibm.com/developerworks/xml/library/x-think18.html
A custom-fit career in app development - http://www.adtmag.com/article.asp?id=7744
More information about the XML-SIG