[XML-SIG] no parent?

Andrew Clover and-xml at doxdesk.com
Thu Oct 14 17:44:54 CEST 2004

Uche Ogbuji <uche.ogbuji at fourthought.com> wrote:

 > One of several examples of where the DOM WG was on crack.

Heh. Yeah, it's not one of their more practical decisions, but it's 
understandable: every other NodeList in the DOM is 'live', including 
childNodeses and the traditional DOM Level 0 HTML ones W3 inherited. For 
getElements... to behave differently would be a bit odd. Probably it 
should have returned a different kind of List interface to highlight the 

 > This is one area of compliance we purposefully declined in 4DOM (this
 > and entity ref handling were the main areas of non-compliance).

Entities are another disaster, indeed. Dealing with entity references 
(especially in combination with DOM 3 stuff and all the other DTD 
nonsense) makes writing a fully compliant DOM implementation orders of 
magnitude more complex as it should really be.

[ Rant: I would really like to see a Sanity-Enhanced XML with all the 
obsolete DTD baggage shorn off. No entities/entity references (we have 
XInclude now for higher-level includes and between character references 
and proper Unicode text editors there's no need for the likes of 
&eacute;), no attribute defaulting (DOM makes it easy to detect/cope 
with missing attributes anyway) and no ID attribute types (pending 
xml:id catching on). As for validation we have Schema, RELAX and 
Schematron built on top of XML. There is no need for the added 
complication of building the validation method, and what is essential a 
  full macro pre-processor into XML itself.

This would bring benefits by making parsers and DOM imps much less 
complicated and prone to bugs, and would remove a number of grey areas 
where the spec is not clear what an imp should do. The divergence of 
behaviour and outright bugginess in the crannies of XML tools - not just 
Python ones - even after so many years shows there is a real problem 
with the status quo. ]

 > I don't see this as any sort of misbehavior.

I would have preferred it if minidom/4DOM had made it clearer the spec 
wasn't being followed though; currently the Library Reference doesn't 
mention the issue. Perhaps a different method name 
(getStaticElementListByTagName or something?) would have helped. Ah 
well, too late now, it's just another DOM gotcha...

Andrew Clover
mailto:and at doxdesk.com

More information about the XML-SIG mailing list