[XML-SIG] Reconsidering the DOM API

Benjamin Saller case@appliedtheory.com
Wed, 28 Jun 2000 14:14:59 -0400 (EDT)

Today, Paul Prescod wrote:
    Core DOM? How is it complex? You have parents, children, elements,
    attributes, siblings, etc. Usability enhancements are important (I
    typically combine XPath with the DOM whenever I need to do DOM work) but
    they are extensions. The DOM itself is not that complicated.
    I mean the DOM was designed for knuckle-dragging JavaScript
    "programmers" (term used lightly). The core concepts can be taught in
    five minutes (see the XML Howto). I don't see the complexity. I would
    say rather that it isn't complex enough in that it is lacking query
    facilities (i.e. XPath).

You are totally correct that the concept of the DOM is simple. The
complexity is the usage in terms of things that you should be able to do
with 2 or 3 lines of code need 2 or 3 times that without something like
XPath. I just think the more common the usage pattern the easier you need
it to be. I don't mean to sound at odds with you and I obviously don't
expect you to disagree with the last statement. I am just saying that we
both see a common usage pattern that is not supported out of the box in
Python and it looks like it won't be in 1.6.

I am just trying to encourage solutions with very simplistic usage
patterns and would like to be able to 'sell' that. When people ask what a
solution looks like in Java or ColdFusion or PHP I want to be able to
point to a Python solution that is simpler and uses less code.

Benjamin Saller                                     <case@appliedtheory.com>
Technical Strategist                                AppliedTheory
	Where tire hits pavement on the Information super-highway,	
			 that's where my head is...